<?php
class ajaxHTML{
//	private $lang = '';
//	
//	public function __construct(){
//		$this->lang = $this->getLanguage();	
//	}
//	
//	public function getLanguage(){
//		$lang = sessions::getSessionByName();
//		if (file_exists('../../language/contact_'.$lang.'.php')){
//			require_once '../../language/contact_'.$lang.'.php';
//		}else{
//			require_once '../../language/contact_en.php';
//		}
//		return $lang;
//	}
	
	public function contactForm( $lists = NULL ){
		$html = "";
		foreach($lists as $list){
			$html .= "<tr id='contact".$list->id."'>";
			$html .= "<td>".$list->postname."</td>";
			$html .= "<td>".$list->contactname."</td>";
			$html .= "<td>".$list->phonenumber."</td>";
			$html .= "<td>".$list->email."</td>";
			$html .= "<td style='display: none'><a href='#' id=".$list->id."></a></td>";
			$html .= "</tr>";
		} 
		return $html;
	}
	public function contractForm( $lists = NULL ){
		$html = "";
		foreach($lists as $list){
			$html .= "<tr id='contract".$list->id."'>";
			$html .= "<td>".$list->con_name."</td>";
			$html .= "<td>".$list->con_datestart."</td>";
			$html .= "<td>".$list->con_dateend."</td>";
			//$html .= "<td>".$list->description."</td>";
			$html .= "<td style='display: none'><a href='#' id=".$list->id."></a></td>";
			$html .= "</tr>";
		} 
		return $html;
	}
}
?>